<template>
  <el-card body-style="min-height: 86vh">
    <!-- 搜索 -->
    <el-form :inline="true" :model="searchForm">
      <el-form-item label="日期">
        <el-date-picker
          v-model="searchForm.date"
          type="daterange"
          range-separator="-"
          start-placeholder="请选择开始日期"
          end-placeholder="请选择结束日期"
        />
      </el-form-item>
      <el-form-item>
        <el-button @click="handleRestSearch">重置</el-button>
        <el-button type="primary" @click="handleGetTableList">查询</el-button>
      </el-form-item>
    </el-form>
    <el-divider />
    <!-- 表格 -->
    <el-table :data="tableData">
      <el-table-column label="员工姓名" prop="name" width="120" align="center"></el-table-column>
      <el-table-column label="上班天数" prop="workday" width="120" align="center"></el-table-column>
      <el-table-column
        label="请假天数"
        prop="leaveday"
        width="120"
        align="center"
      ></el-table-column>
      <el-table-column
        label="迟到次数"
        prop="lateday"
        width="120"
        align="center"
      ></el-table-column>
      <el-table-column
        label="早退次数"
        prop="earlyday"
        width="120"
        align="center"
      ></el-table-column>
      <el-table-column label="订单数量" prop="orderNumber" width="120" align="center"></el-table-column>
      <el-table-column label="业绩" prop="money" align="center"></el-table-column>
    </el-table>
  </el-card>
</template>
<script setup lang="ts">
import { useInitTable, useInitForm } from "@/hooks/useCommon";
import { getRoleListApi } from "@/api/user";
const tableData = [
  {
    id: 1,
    name: "张三",
    workday: "28",
    leaveday: "3",
    lateday: "1",
    earlyday: "1",
    orderNumber:"20",
    money: "10000"
  }
]
const { searchForm, handleRestSearch, handleGetTableList } = useInitTable({
  searchForm: {
    data: []
  },
  getTableList:getRoleListApi
});
</script>
<style scoped lang="scss"></style>
